package top.mcwebsite.playandroid.business.user_article.impl.netwrokapi

import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path
import top.mcwebsite.playandroid.business.articles.api.model.ArticleModel
import top.mcwebsite.playandroid.common.network.model.ApiResult
import top.mcwebsite.playandroid.common.network.model.PageModel
import top.mcwebsite.playandroid.common.network.model.RespModel

interface UserArticleApi {

    @GET("/user_article/list/{page}/json")
    suspend fun userArticleList(@Path("page") page: Int): ApiResult<RespModel<PageModel<ArticleModel>>>

    @POST("/lg/collect/{id}/json")
    suspend fun collectArticle(@Path("id") id: Long): ApiResult<RespModel<Unit>>

    @POST("/lg/uncollect_originId/{id}/json")
    suspend fun unCollectArticle(@Path("id") id: Long): ApiResult<RespModel<Unit>>
}